#ifndef VSDEPTHSTENCIL_H
#define VSDEPTHSTENCIL_H
#include "VSBind.h"
namespace VSEngine2
{
	class VSStream;
	class VSGRAPHIC_API VSDepthStencil : public VSBind
	{
		//RTTI
		DECLARE_RTTI;
		DECLARE_INITIAL_NO_CLASS_FACTORY
		
	public:
		friend class VSResourceManager;
	protected:
		VSDepthStencil();
		VSDepthStencil(unsigned int uiWidth,unsigned int uiHeight,
			unsigned int uiMulSample,unsigned int uiFormatType);
	public:
		
		virtual ~VSDepthStencil();
		inline unsigned int GetWidth()const
		{
			return m_uiWidth;
		}
		inline unsigned int GetHeight()const
		{
			return m_uiHeight;
		}
		inline unsigned int GetMulSample()const
		{
			return m_uiMulSample;
		}
		inline unsigned int GetFormatType()const
		{
			return m_uiFormatType;
		}
	public:

		virtual unsigned int DiskUse()const;

		virtual bool Save(VSStream & rStream,unsigned int &iSaveUse)const;
		virtual bool Load(VSStream & rStream,unsigned int &iSaveUse);
	public:
		virtual bool Clone(const VSObject *pObject,unsigned int uiType);

	protected:

		unsigned int m_uiWidth;
		unsigned int m_uiHeight;
		unsigned int m_uiMulSample;
		unsigned int m_uiFormatType;
	protected:
		virtual bool OnLoadResource(VSResourceIdentifier *&pID);		
		virtual bool OnReleaseResource(VSResourceIdentifier *pID);

	};
	DECLARE_Ptr(VSDepthStencil);
	VSTYPE_MARCO(VSDepthStencil);
}
#endif